<%@ page language="java" contentType="text/html; charset=utf-8"	pageEncoding="utf-8"%>
<%@taglib prefix="s" uri="strutsTags"%>
<html>
<body>
<div class="wrapper">
	<div class="tipdiv">
		<p>1. 是不是允许创建非本人的培训申请:允许/不允许，缺省为允许</p>
	</div>
	<div class="contentdiv">
		<form id="trainingForm" action="updateTrainingConfig.action" method="post">
			<s:token />
			<p>
				创建非本人培训申请:
				<s:hidden id="sys_train_create_level" name="sys_train_create_level" ></s:hidden>
                <s:if test="sys_train_create_level==0">
					<input type="radio" class="radio" id="submitSub" name="submitSub" onclick="changeSelectSub()" value="1"></input>允许
					<input type="radio" class="radio" id="submitSub" name="submitSub" onclick="changeSelectSub()" value="0" checked="checked"></input>禁止
				</s:if>
				<s:else>
					<input type="radio" class="radio" id="submitSub" name="submitSub" onclick="changeSelectSub()" value="1" checked="checked"></input>允许
					<input type="radio" class="radio" id="submitSub" name="submitSub" onclick="changeSelectSub()" value="0"></input>禁止
				</s:else>
			</p>
			<p>
				<br>
			    <input id="updateTrainingBt" class="button" type="button" onclick="updateTrainingConfirm();" value="更新" />
			</p>
		</form>
	</div>
</div>
<script type="text/javascript">
//根据标签的name属性来获得相应的值
function getValueByName(name) {
	var temp = document.getElementsByName(name);
	var Thevalue;
	for (i = 0; i < temp.length; i++) {
		if (temp[i].checked) {
			Thevalue = temp[i].value;
		}
	}
	return Thevalue;
}
function changeSelectSub() {
	document.getElementById("sys_train_create_level").value = getValueByName("submitSub");
}

function updateTrainingConfirm() {
	if (confirm("您确定修改培训模块配置？")) {
	    document.getElementById("updateTrainingBt").disabled=true;
		document.getElementById("trainingForm").submit();
	}
}
</script>
</body>
</html>
				
			

